package edu.gdpu.mybatis.mapper;

import edu.gdpu.mybatis.pojo.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author:ws
 * @Date:2023/3/7/007
 * @description:learning
 */
public interface UserMapper {
//    int insertUser();
//    int deleteUser();
//    int updateUser();
//    User selectUser();
//    List<User> selectAllUsers();
    User selectUse0ByName(String name);
    User checkLogin(String name,Integer age);
    User checkLoginByMap(HashMap map);
    int insertUser(User user);
    User checkLoginByParam(@Param("name") String username,@Param("age")Integer age);

    Integer getNumberOfUser();
    Map<String,Object> selectUserByIdtoMap(@Param("id") Integer id);
    List<Map<String,Object>> selectAllUserBytoMap();
    @MapKey("id")
    Map<String,Object> selectAllUserToMap2();

    User selectUserByName2(String name);
    List<User> selectAllUsers();
    List<User> selectUserByLike(@Param("cstring") String cstring);
    List<User> selectUsersByTable(@Param("tablename") String tablename);
    void insertUser2(User user);
    void deleteMultiUser(@Param("ids") String ids);

}
